<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <script src="./js/vue.js"></script>
</head>
<style>
    .a1{
        font-size: 30px;
        color: red;
    }
    span{
        color: black;
    }
</style>
<body>
    <div id="app">
        <a1>
            显示内容为：
          </a1>
    </div>
    <script>
        Vue.component('a1', {
  template: `
    <div class="a1">
    <slot></slot>
    
    <span>你好世界</span>
    </div>
  `
})
        let vm = new Vue({
            el: "#app",
            data: {
               
            }
        })
    </script>
</body>

<html>